package com.inspur.service;

import com.inspur.bean.UserBean;

public class UserCheck {
	static UserBean[] users=new UserBean[3];
	static{
		users[0]=new UserBean();
		users[0].setUserName("admin");
		users[0].setPassword("password");
		
		users[1]=new UserBean();
		users[1].setUserName("admin1");
		users[1].setPassword("password1");
		
		users[2]=new UserBean();
		users[2].setUserName("admin2");
		users[2].setPassword("password2");
		
	}
	
	public boolean checkUser(UserBean userBean){
		boolean rst=false;
		
		for(int i=0;i<users.length;i++){
			UserBean ub=users[0];
			
			if(ub.getPassword().equals(userBean.getPassword())&&ub.getUserName().equals(userBean.getUserName())){
				return true;
			}
		}
		
		return rst;
	}
}
